


<style>
    .request_data_table input{width: 80px!important;padding-left: 10px;}
    .reward-tab{padding: 10px;height: 100%;width: 849px;margin-left: 69px;}
    .share-reward input{margin-top:20px;}
    .add-share,.add-team{cursor: pointer;background-color: rgb(0,166,90); display:inline-block;text-align: center;font-size: 20px; line-height: 22px;width: 22px}
    .reduce-share,.reduce-team{cursor: pointer;background-color:  rgb(221,75,57); display:inline-block;text-align: center;font-size: 20px; line-height: 22px;width: 22px}
</style>


<div class="x-body">
    <div class="layui-form form_single" id="form" action="{:url()}" method="post">
        <div class="layui-form-item">
            <label for="title" class="layui-form-label">
                <span class="x-red">*</span>倍投名称
            </label>
            <div class="layui-input-block">
                <input type="text" id="title" name="title" onchange="this.value=this.value.substring(0, 30)" onkeydown="this.value=this.value.substring(0, 30)" onkeyup="this.value=this.value.substring(0, 30)"  required="" lay-verify="required"
                       autocomplete="off"  value="{$info['title']|default=''}" class="layui-input">
            </div>
            <div style="color: red !important;" class="layui-form-mid layui-word-aux">
                （限制30字符）
            </div>
        </div>
        <div class="layui-form-item">
            <label for="logo" class="layui-form-label">
                <span class="x-red">*</span>图标（165*128）
            </label>
            <div id="logo" class="layui-input-block">
                {assign name="cover_id" value="$info.cover_id|default='0'" /}
                {:widget('file/index', ['name' => 'cover_id', 'value' => $cover_id, 'type' => 'img'])}
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(请上传单张封面图片)-->
            <!--</div>-->
        </div>


        <table class="layui-table x-admin">
            <thead>
            <tr>

                <th>局数</th>
                <th>倍数</th>
                <th>中后</th>
                <th>挂后</th>
                <th>  <b class="add-share add-table" >+</b></a>&nbsp;&nbsp;  <b class="reduce-share reduce-table" >-</b></th>
            </tr>
            </thead>

            <tbody class="table-body" >
            {if condition="isset($info) eq true"}
            {volist name='info.content' id='vo'}
            <tr class="table-data">
                <td class="count">{$vo.count}<input type="hidden" name="count[]" value="{$vo.count}"></td>
                <td><input type="number" name="recharge[]" value="{$vo.multiple}"></td>
                <td>第<input type="number" name="bureaus[]" value="{$vo.bureaus}">局</td>
                <td>第<input type="number" name="bureaus_two[]" value="{$vo.bureaus_two}">局</td>
                <td>  <b class="add-share add-tr" >+</b></a>&nbsp;&nbsp;  <b class="reduce-share reduce-tr" >-</b></td>
            </tr>

            {/volist}
            {else/}
            <tr class="table-data">
            <tr class="table-data">
                <td class="count">1<input type="hidden" name="count[]" value="1"></td>
                <td><input type="number" name="recharge[]" value="1"></td>
                <td>第<input type="number" name="bureaus[]" value="1">局</td>
                <td>第<input type="number" name="bureaus_two[]" value="1">局</td>
                <td>  <b class="add-share add-tr" >+</b></a>&nbsp;&nbsp;  <b class="reduce-share reduce-tr" >-</b></td>
            </tr>
            </tr>
            {/if}


            </tbody>
        </table>














        <div class="box-footer">
            <input type="hidden" name="id" value="{$info['id']|default='0'}"/>

            {include file="layout/edit_btn_group"/}

        </div>

        </form>
    </div>
</div>
<script>


    $('.x-admin').on('click','.reduce-table',(function () {



        $('.table-data').last().remove();

    }))

    $('.x-admin').on('click','.add-tr',(function () {

        var len=$(".count").length+1;

        var html= '  <tr class="table-data">    <td class="count">'+len+'<input type="hidden" name="count[]" value="'+len+'"></td>\n' +
            '                <td><input type="number" name="recharge[]" value="0"></td>\n' +
            '                <td>第<input type="number" name="bureaus[]" value="0">局</td>\n' +
            '                <td>第<input type="number" name="bureaus_two[]" value="0">局</td>\n' +
            '                <td>  <b class="add-share add-tr" >+</b></a>&nbsp;&nbsp;  <b class="reduce-share reduce-tr" >-</b></td> </tr>';

        $(this).parent().parent().after(html);

    }))
    $('.x-admin').on('click','.reduce-tr',(function () {



        $(this).parent().parent().remove();
    }))


</script>
